What to replace in Crystal Report Programmatically? - vb.net

I have a line of code to set the Report.PrintDate in VB6.How can we replace this line for CrystalDecisions.CrystalReports.Engine.ReportDocument ? In VB6 we have it is the inbuilt property for CRAXDRT.Report.
So can any once help me regarding this ?

if you want to show the current Date/Time of the printed report, you can use the built in Special Fields within the report designer . From your comment I understand you want to set that programatically. Then you need to create a Parameter and set it from code.
You can watch this DEMO to get to know how to create parameters. This Answer would show you how to pass the parameter from code.

Related

BC: How to add a dataset and modify a report from 'base microsoft' with a 100xx ID?

I am trying to modify a report that is given by base microsoft and I can't figure out how to 'replace' and add a dataset the 10081 report.
I have tried copying the report and modifying it, but I need to add a dataset and don't have access to the al code due to it being a base microsoft report.
I tried to make a new report, it just wont appear when I try and got o the returns. When I try to replace the 10081 report with the custom 5014x report it gives me an odd error like 'textbox billtity needs to be named billtocity' even though it is. I have also included the '=First(... , 'dataset') in the expresssion
Any youtube links, links to documentation or anything would be helpful.

Load only select sections of Code in QlikView

I have a set of code that is rather large in Qlik. I have dates that are defined at the start of the script
i.e.
Let vBDate = Date(Date#('01/01/2015','MM/DD/YYYY'),'MM/DD/YYYY');
Let vEDate = Date(Date#('12/31/2015','MM/DD/YYYY'),'MM/DD/YYYY');
The entire code runs financial numbers based on a specific data source. Originally I had a version of this QVW for each data source. However, as often goes with financials the QVW constantly needs to be refined. So I merged them all into one code. I broke the Code up into different tabs so I can turn off the sources I don't want.
What I want to do is try to se a variable, either in the code, like this,
Let vROIType = 'Vendor';
or using the method answered in my first attempt at this question where the variable is defined on the designer side using a button.
The hope is that when the variable is set, then only the code associated with that variable will run in the reload and the other code will be skipped.
In my research I tried to create functions in the script and use code to call them, however the call would always error out. I also read about QVDs but many of my date variables are defined at the start of running it, and the QVD needs to be pre-run.
Any help would be appreciated.
As long as you wrap the appropriate sections of the script in the conditionals properly, this should accomplish it:
Create a variable via the Variable Overview window (ctrl + alt + v) like you mentioned to reference the correct script to be reloaded (vROIType)
Create a button or text box and set an action to change the value of the vROIType variable. You can just make two buttons so you can select the correct data source by clicking the appropriate button.
Either reload via the menu or create another text box/button with an action to reload your script.
Most importantly, use conditionals in your script to selectively run the correct portions based on the vROIType variable.
if vROIType = 'Vendor' then
Everything in the script you want run when the source is `Vendor`.
elseif vROIType = 'SomeOtherVendor' then
Everything in the script you want run when the source is ....
end if;
Upon reload, the script will look at the vROIType variable and use that to determine whether or not to run parts of the script. Here's a link to a simple example you can try if you have the paid version of Qlikview, otherwise it'll yell at you that you can't open third party .qvw's.

Removing the time on Field object in Crystal Report using vb.net

In my Database i use mysql i have a value of 7/25/2015
My report code:
rptmain.Subreports("CrystalReport1.rpt").SetDataSource(dtincom)
the problem when i am displaying the report it looks like this
7/25/2015 12:00:00 AM
which is not what i want. i want the original value inside my database is this possible without doing such code? please take a look of the picture below.
ToText({DataTable1.date_conduct}, "MM-dd-yyyy")

Beginner with OO CLI to generate PDFs and Uno.Any issue in VB.Net

I'm a beginner in writing code that allows us (my company) to generate reports using the OpenOffice DLL allowing the generation of PDFs. I'm using ASP.NET, writing in VB. I need to be able to modify the cell of a table using the xPropertySet member/functions. So I have a variable named Property which is of the the xPropertySet and references the cell that I want. I'm assuming that I need to use the setPropertyValue function but I'm not entirely sure what arguments I should give it. The end result I want is the following:
Description: ________________
I need to figure out how to make the cell that I have above with the underscores just a border on the bottom. Because I'll have some fields that will be pre-populated. As a test I tried doing objCell.Property.setPropertyValue("CharColor", 255), but I get an error saying that Integer cannot be casted to an uno.Any type. Which, unfortunately I know nothing about. Any help would be greatly appreciated. Thank you.
Alright, sorry all I figured it out finally. All I did is created a border variable of type BorderLine like follows
Dim border As New unoidl.com.sun.star.table.BorderLine
Then I set the outerWidth like so:
border.OuterLineWidth = 1
Then I use the setPropertyValue method for the specific cell that I need So something like this:
objCell.Properties.setPropertyValue("BottomBorder", New uno.Any(border.GetType, border))
Of course Properties between ObjCell and Properties is the xPropertySet of the cell. Anyway, hope this helps someone else.

Excel Stored Procedure with Excel

I have stored proc Im pulling in to excel but to get it to Run I have to enter my text exec roc 'Name' I need it to be able to have someone else thats running it be able to enter a name as they refresh the data. I dont know VBA at all and am looking for help.
I don't completely understand your question but if my assumption is correct... you want to have a cell where someone can enter some sort of name, where you can then use their input to do some other operations.
To start, you would want to grab a string variable (by grab I mean create)
Example:
Dim strName As String
Then you would want to be able to read a specific cell.... In the next example the cell will be A2
Example:
strName = Range("Sheet1!A2").Value
If you named the first sheet something different use that name. If the user inputs a name into that cell you can then use it later to do calculations or anything you want.
If you are not using VBA code then what are you using?
If using MS Query, try changing the SQL text to
{CALL roc(?)}
and IIRC this should prompt the user to enter text for the parameter value.