Dynamic report name
Dynamic report name
I have an app which prints bills. Several users will access the same database. However different users want their logo on the bill.
Apparently I cannot do that.
1. Images in the RPX are static.
2. The RPX file name is static - unlike SalReportPrint( hWndForm, sRepName, sVars, sInput, 0, RPT_PrintAll, 0, 0, nErr )
Would genuinely appreciate any ideas on how to go about it.
Apparently I cannot do that.
1. Images in the RPX are static.
2. The RPX file name is static - unlike SalReportPrint( hWndForm, sRepName, sVars, sInput, 0, RPT_PrintAll, 0, 0, nErr )
Would genuinely appreciate any ideas on how to go about it.
Dynamic report name
Feroz,
AFAIK images are not static, you can assign a variable with a string containing the file name, or an object to it.
Take a look at IslandReport/IslandDemo.apx sample in you samples folder.
You have a EmployeeSalaryReport.RPX using both methods.
HTH
AFAIK images are not static, you can assign a variable with a string containing the file name, or an object to it.
Take a look at IslandReport/IslandDemo.apx sample in you samples folder.
You have a EmployeeSalaryReport.RPX using both methods.
HTH
Igor Ivanovic


Dynamic report name
Hi,
You can put the logo in the database and dynamically obtain the logo in a variable, then sends it to the report as an object.
Thanks.
Fausto.
You can put the logo in the database and dynamically obtain the logo in a variable, then sends it to the report as an object.
Thanks.
Fausto.
Dynamic report name
Thanks! Let me try it out.
Dynamic report name
Been struggling. How does one convert the image (string) to binary?
Dynamic report name
What are you trying to achieve?
Save a picture to database, or something else?
A little more info would be fine...
Save a picture to database, or something else?
A little more info would be fine...
Igor Ivanovic


Dynamic report name
A picture can be used in a report (PDF) if it is in binary.
The statement which fetches a string in binary in Sqlserver is:
SELECT CAST(N' ' as xml).value('xs:base64Binary(sql:column(\"M_IMAGE\"))', 'varbinary(max)') INTO...
Unfortunately this does not work in TDM. A defect has been logged today as:
Defect number TD-24174
Using this table
CREATE TABLE BULL ( M_IMAGE VARCHAR(MAX) )
With this select statement
Set sSelect = "SELECT CAST(N' ' as xml).value('xs:base64Binary(sql:column(\"M_IMAGE\"))', 'varbinary(max)') FROM BULL INTO :S"
Will give the error "Incorrect syntax near ''.
The issue does not show using TD WIN32 native router and OLEDB
I need to convert the string into binary.
The statement which fetches a string in binary in Sqlserver is:
SELECT CAST(N' ' as xml).value('xs:base64Binary(sql:column(\"M_IMAGE\"))', 'varbinary(max)') INTO...
Unfortunately this does not work in TDM. A defect has been logged today as:
Defect number TD-24174
Using this table
CREATE TABLE BULL ( M_IMAGE VARCHAR(MAX) )
With this select statement
Set sSelect = "SELECT CAST(N' ' as xml).value('xs:base64Binary(sql:column(\"M_IMAGE\"))', 'varbinary(max)') FROM BULL INTO :S"
Will give the error "Incorrect syntax near ''.
The issue does not show using TD WIN32 native router and OLEDB
I need to convert the string into binary.
Dynamic report name
TDM is supporting SalStringToBinary() and SalBinaryToString() but this won't do base64 conversion I feel. I think we should create a C# function for that. However I generally create a stored function in SQL Server or Views for this kind of database dependent syntax since I use multiple databases.
Dynamic report name
This explains your problem, as it's a bug in the router implementation for SqlServer.
TDM2.2 is almost ready for production, as it seems to me, maybe it's fixed in it.
I am receiving a lot of Defect-resolved statuses on the TDM issues I opened, so you should check if the status of the TD-24174 is resolved.
If not, the workaround a_sivababu suggested could be the resolution for your problem.
TDM2.2 is almost ready for production, as it seems to me, maybe it's fixed in it.
I am receiving a lot of Defect-resolved statuses on the TDM issues I opened, so you should check if the status of the TD-24174 is resolved.
If not, the workaround a_sivababu suggested could be the resolution for your problem.
Igor Ivanovic


Who is online
Users browsing this forum: No registered users and 1 guest