I am new to LogiAnalytics. I am using Series.Line to plot a graph with values retried from MongoDB. The values are different for each date. Some times it happens that for the very first date there is no value in the MongoDB collection itself. When we create a graph, it ignores the first value which is actually not having a value and starts from the second point which has a value.
In the Series.Line there is an attribute "Connect Nulls" and we set that to "true". However it does not make any impact. Can any please help me solve this problem.
I am adding my code snippet here"
<ChartCanvas
AutoQuicktip="True"
BorderColor="#cfcfcf"
BorderColorTransparency="1"
ChartBorderThickness="1"
ID="lineChart"
NoDataCaption="#Request.noDataDisplay~"
SpacingLeft="50"
SpacingRight="50"
>
<Series ChartXDataColumn="dateCalculatedColumn"
ChartXDataColumnType="DateTime" ChartYDataColumn="count"
ConnectNulls="True"
ID="engagementSeriesLine" Type="Line"
>
<DataLayer
ConnectionID="connMetrics"
ID="dlLineGraph"
MongoRunCommand="{
//My query here
}"
Type="MongoRunCommand"
>
<CalculatedColumn
Formula="(new
Date(#Data.day~).getMonth()+1)+"/"+new
Date(#Data.day~).getDate()+"/"+new Date(#Data.day~).getFullYear()"
ID="dateCalculatedColumn"
/>
<CrosstabFilter
CrosstabColumn="network"
CrosstabLabelColumn="dateCalculatedColumn"
CrosstabValueColumn="count"
CrosstabValueFunction="sum"
ID="rdCrosstabValue"
/>
</DataLayer>
</Series>
<ChartXAxis
AxisType="DateTimeLinear"
ScaleLowerBound="#Request.stDate~"
ScaleUpperBound="#Request.edDate~"
>
<AxisLabelStyle
Format="MM/dd"
/>
</ChartXAxis>
</ChartCanvas>
Request you to please help.
Unfortunately, If it is a bug in Logi, especially one they've fixed in a newer version, you're only real solution is to update the version you are running. Luckily that's pretty easy to do, it just requires some regression testing to make sure your existing application isn't going to have any issues.
Related
I am new to oozie and trying to understand dataset.xml. I have following dataset and trying to understand what exactly oozie is trying to validate here. what is the meaning of initial instance and what uri-template is doing here(not clear on oozie document)
<dataset name="sample" frequency="${coord:hours(1)}" initial-instance="2022-01-10T00:00Z" timezone="UTC">
<uri-template>${hdfsdir}/filepath/${YEAR}${MONTH}${DAY}${HOUR}</uri-template>
<done-flag>_SUCCESS</done-flag>
</dataset>
Similarly, in coordinator I have following for input and output dataset. Here what is the significance of current(-5) and start parameter?
<coordinator-app name="test" frequency="${freq}" start="2022-01-10T00:00Z" end="2023-04-11T00:00Z" timezone="UTC" xmlns="uri:oozie:coordinator:0.4" xmlns:sla="uri:oozie:sla:0.2">
<data-in name="raw" dataset="raw_data">
<instance>${coord:current(-5)}</instance>
</data-in>
<data-out name="processed" dataset="raw_out">
<instance>${coord:current(-5)}</instance>
</data-out>
Can someone explain what oozie is expecting on the datasets?
Thanks, bab
Without looking at the documentation, here's what I can guess.
initial-instance - When is the dataset first available? If you try to provide a timestamp before this in a workflow or coordinator, you can expect an error.
After which, a positive frequency will "count up" from that timestamp
uri-template uses built-in Oozie variables to determine what pattern those files exist in the filesystem.
coord:current(-5) will multiply 5 by the dataset frequency, and return the 5th previous instance... Giving you a dataset 5 hours before the time that the coordinator was started.
So, for your example, you have dataset name="sample" defined, but your data-in and data-out tags do not reference this, so I don't think anything will run...
Here's the docs for coord:current (might say something different from my answer) https://oozie.apache.org/docs/5.2.1/CoordinatorFunctionalSpec.html#a6.6.1._coord:currentint_n_EL_Function_for_Synchronous_Datasets
Section 5.1 seems to mostly answer your question
Currently, I was working on a Unity project and using Firestone as my database.
now i facing a problem is when i create a document in firestone i want to add the time of creation also.
i was using the code
db.Collection("Challenges").Document(addedDocRef.Id).UpdateAsync("TimeCreated", Firebase.Firestore.FieldValue.ServerTimestamp);
but it always update the same time in firestone.
every document get same timestemp, can anyone teach me how to solve this issue?
The FieldValue properties are sentinel values in this case to be understood as dummy values that are supposed to be filled in by "someone".
I don't know how Firebase works exactly and who is supposed to fill this in but what you get basically equals DateTime.UnixEpoch the default uninitialized system time (+ 7:30 timeszone shift). It might have to be configured accordingly somewhere before it works correctly.
You could instead simply pass in your own timestamp using e.g. DateTime.Now
I am trying to set the system time in Movesense. I couldn't find an example of that, but based on the documentation I think that this should do:
asyncPut(WB_RES::LOCAL::TIME(),
AsyncRequestOptions::Empty,
(int64_t)0);
In this case, I'm just trying to reset the epoch to zero but onPutResults gives me
HTTP_CODE_BAD_REQUEST
So what is the right way?
Minimum timestamp seems to be 1483228800000000 us which corresponds to 1.1.2017. So you can't set the time to 70's as zero would set it to.
This should be documented in the yaml api but currently is not. We will add that to the list of tasks to make sure it's documented in the next release of device-lib.
How do I run a query using a value from a textbox from a form I have? I know that there is another post here at Stackoverflow dealing with this issue but I found it to be insufficient for my needs.
I formated my textbox into Medium Date format with its default value being =Date(). However, when I pick up a date and open my report I get this error:
Runtime error 3071: Expression Too Complex
My where clause is this
WHERE
(
(AllInfo.DateOpened >= CDate([Forms]![Main Form]![WindowPrintOptions]![CustomizedReport]!txtDateOpenedFrom.Value))
)
and I am sure it is this code piece that is throwing the problem since when I take it out of the query the error message simply disappears.
Any ideas?
Try with:
(AllInfo.DateOpened >= DateValue([Forms]![Main Form]![WindowPrintOptions].[Form]!txtDateOpenedFrom))
)
Folks,
I got the problem. It was the "AllInfo" alias. It wasn't applicable at that escope inside the query. By changing the proper things, it was enough to write:
[Forms]![Main Form]![WindowPrintOptions]![CustomizedReport]!txtDateOpenedFrom.Value
Issue solved. Thank you all!
In Crystal reports, you can define default values for the report parameters.
For example, I might have a date range and set a default start of 12/01/2008 and a default end of 12/31/2008.
Is it possible to modify these defaults at runtime? For example:
1 - Default to the first and last days of the current month?
2 - Default to the first and last days of a proprietary company fiscal calendar? (i.e., look it up in a database)
3 - First & Last days of the current year?
You get the point. Is this possible? I'd even be open to a solution that involved running an external application to reach into the reports and modify them, if anyone knows how to do that.
Edit:
To answer the question posed by Philippe Grondier, most of these reports are run from inside an application. I was hoping for something simpler than manipulating the crystal object at runtime; I have my hands full right now with figuring out other parts of that API. I might take a look in the future, though.
Are you planning to run your crystal report from the crystal reports interface or as an add-in embedded in another program (you can for example use the Crystal Reports ActiveX Designer Runtime Support - craxdrt.dll - in VB code) ? In this last case, it is possible to manipulate every object of the report before launching it. Objects such as parameters can then be updated according to your needs.
As a simple example of such runtime update, my report printing routine will allways check if there is a field named "printedBy" in the report. In case this field is found, its value will be settled to the the domain name of the user that requests the report and will be printed out.
At an higher level, you can even reshape the report SQL string to add specific filters that can be inherited from your code. By doing so you might not even need parameters anymore: let your code add the filtering values 'on the fly'
EDIT: some code examples:
(m_rapport is a CRAXDRT.report object, ActiveSession is my current session object)
If m_rapport.ParameterFields.Count > 0 Then
For i = 1 To m_rapport.ParameterFields.Count
If m_rapport.ParameterFields(i).Name = "{?PUB_DateDebutPeriode}" Then
m_rapport.ParameterFields(i).AddCurrentValue CDate(DateValue(sessionActive.dateDebutPeriode))
End If
If m_rapport.ParameterFields(i).Name = "{?PUB_DateFinPeriode}" Then
m_rapport.ParameterFields(i).AddCurrentValue CDate(DateValue(sessionActive.dateFinPeriode))
End If
If m_rapport.ParameterFields(i).Name = "{?PUB_id_Personne}" Then
m_rapport.ParameterFields(i).AddCurrentValue StringFromGUID(clientActif.id_Personne)
End If
Next i
Endif
I also have another function to change report's datasource at runtime, so that reports can be executed on different servers/locations.
Read my posting Crystal Reports: Named-Date-Range Parameters. Maybe you'll be able to leverage this technique for your purposes.