Showing posts with label writing. Show all posts
Showing posts with label writing. Show all posts

Friday, March 30, 2012

Inserting a document (PowerPoint, Word, PDF) into a report (SSRS 2

Hi,
Which is the best way to insert a document (Word, PowerPoint, PDF) into a
report, which is also rendered with the masn report?
Writing a custom report item? Rendering as image?
But how to do a page break?
Is there a commercial solution available?
I'm using SSRS 2005.
Thanks
EricHi Eric,
Welcome to the MSDN newsgroup.
As for the displaying rich binary document in SQL server 2005reporting
service report, do you mean HTML format report? If so, I think you can
consider using the Html <iframe> element to embed the binary document
(powerpoint, word, pdf....)... Of course, you may need to create a custom
report item which can render out the html <iframe> element. For normal web
page, we can embed an <iframe> like below:
=========================<iframe id="frmPPT" runat="server" src="http://pics.10026.com/?src=small.ppt" width="100%"
height="500" >
======================
Hope this helps.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Thanks Steven,
But the report should also be rendered to PDF, not only HTML.
After the SQL2005 documentation as custom report item only the type 'image'
is supported, this means that i can't render html. Or do you mean a new item
based on the textbox (overloaded)?
Is there no other solution?
Is MS not working on a Word render extension?
Thanks
Eric
"Steven Cheng[MSFT]" wrote:
> Hi Eric,
> Welcome to the MSDN newsgroup.
> As for the displaying rich binary document in SQL server 2005reporting
> service report, do you mean HTML format report? If so, I think you can
> consider using the Html <iframe> element to embed the binary document
> (powerpoint, word, pdf....)... Of course, you may need to create a custom
> report item which can render out the html <iframe> element. For normal web
> page, we can embed an <iframe> like below:
> =========================> <iframe id="frmPPT" runat="server" src="http://pics.10026.com/?src=small.ppt" width="100%"
> height="500" >
> ======================> Hope this helps.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>|||Thanks for your response.
For other format (PDf, ...) since they're binary format, I'm afraid there
is no support in the reporting service built-in components. This will
require the convertion between different format binary documents. Also, the
RS 2005 used to plan shipping a RTF/WORD render extension, however, it is
cancelled and I think one of the reason maybe there are already many 3rd
party convert tools for converting different format binary documents (like
word, pdf, chm, html...).
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi Steven,
I do not fully agree with you. First there are not many RDL to Word, PDF or
HTML, ... converter available. I know only SoftArtisan, which isn't a fully
RDL to Word converter.
Second many of our customer in the financial industry want to have more
flexible reporting. This means they want to include "dynamic" informations
into the report which are not based one databases, ex. a word document with
personal informations for one client.
What's the meaning of a reporting server if you have at the end 2 documents?
For that we need a fully supported word renderer, or better a word report
item.
Are there more RDL to word converter available?
Thanks
Eric|||Thanks for your respones Eric,
Yes, so far there is no RDL to word render extension, as our dev team also
mentioned it's still a planed feature in future release. I think this is
also somewhat due to the open of new OFFICE XML format, the new word
rendering extension may mainly target the xml format which will be more
portable. BTW, the converter I mentioned earlier means some 3rd party tool
which can convert pdf, html(exiting file) to word , image or other format
though they not be directly plugged in SSRS.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Inserting a document (PowerPoint, Word, PDF) into a report (SSRS 2

Hi,
Which is the best way to insert a document into a report, which is also
rendered with the report?
Writing a custom report item? Rendering as image?
But how to do a page break?
Is there a commercial solution available?
Thanks
EricHi,
Not sure about my earlier post. Posting it again.
I feel the best way is to provide a link on the report (using action: jump
to URL) and when clicked it should open the attachments. If you want to
render it with the report, then render it as image but store it as external.
Your last ques.. How to do a page break ? with the image or with records ?
Not very sure about the question. Need to explain.
Amarnath
"Eric" wrote:
> Hi,
> Which is the best way to insert a document into a report, which is also
> rendered with the report?
> Writing a custom report item? Rendering as image?
> But how to do a page break?
> Is there a commercial solution available?
> Thanks
> Ericsql

Monday, March 12, 2012

INSERT statement problem

Hi,
I am writing this piece of code:
Code: ( php )
    $sqlquery="WITH journey (TO_TOWN, STEPS, DISTANCE, WAY) AS (SELECT DISTINCT JNY_FROM_TOWN, 0, 0, CAST('PARIS' AS VARCHAR(MAX)) FROM T_JOURNEY WHERE JNY_FROM_TOWN = '$do' UNION ALL SELECT JNY_TO_TOWN, departure.STEPS + 1, departure.DISTANCE + arrival.JNY_MILES, departure.WAY + ', ' + arrival.JNY_TO_TOWN FROM T_JOURNEY AS arrival INNER JOIN journey AS departure ON departure.TO_TOWN = arrival.JNY_FROM_TOWN)SELECT *FROM journeyWHERE TO_TOWN = '$to' ";$results= mssql_query($sqlquery);while ($row=mssql_fetch_array($results)){ $way=$row['WAY'];echo "This is";echo "$way"; $words= split(",", $way);print_r($words); $t1=9.00; $t2=$t1+0.1; for ($i=0;$i<sizeof($words);$i++){$j=$i+1;$from2=$words[$i];$to2=$words[$j]; $from3=strtoupper($from2);echo "$from3";$to3=strtoupper($to2);echo "$from3"; $gool1="SELECT busno,from1,to1,time1,duration,fare FROM dbo.table4 WHERE from1= '$from3' AND to1= '$to3' AND time1>='$t1' AND time1<='$t2'";$shane=mssql_query($gool1);while ($row1=mssql_fetch_array($shane)){ $busno=$row1['busno'];echo "$busno"; echo " ";echo "why";$from1=$row1['from1'];echo "$from1";echo " ";$to1=$row1['to1'];echo "$to1";echo " ";$time1=$row1['time1'];echo "$time1";echo " ";$duration=$row1['duration'];echo "$duration";echo " ";$fare=$row1['fare'];echo "$fare";echo " ";$t1=$row1['time1'] + $row1['duration'];$t2=$t1+0.1;echo "<Br>";} } }

In the above code, I am retrieving values in a variable $way. And then I am splitting the value $way into several smaller string using the function split. it works perfectly. However, when I am passing the variable $from2 and $to2 in my select statement, the statement does not recognise these variables., but wen I write these variables manually to the select statement, it then works.
How can I pass these variables so that my select staement work? I ve checked these variables($from2,$to2) whether they are of string type but they are not.
Please help me.Heya, Gool. Welcome to TSDN!

Please use CODE tags when posting source code:

[CODE=php]
PHP code goes here.
[/CODE]

I'm going to go ahead and move this thread to the MS SQL forum, where our resident Experts will be better able to help you out.|||INSERT statement problem

Insert Statement Help

hi all

i am writing a trigger that inserts from one table to the next. i have an issue with the table being inserted into have 2 more columns than the one being inserted from. Here is the trigger just in case

CREATE TRIGGER [Insert40801] ON [dbo].[tPA10801]
FOR INSERT

AS

insert into tPA40801
select
intTimesheetKey,
chrTimesheetNumber,
TranID,
intEmployeeKey,
intEmployeeDivKey,
BatchKey,
dtePeriodStartDate,
dtePeriodEndDate,
chrStatus1,
numTotalHrsWorked,
numTotalHrsBilled,
numTotalCosts,
numTotalCharges,
numTotalRecover,
chrSignedID,
dteSignedDate,
chrApprovalID,
dteApprovalDate,
intJobKey,
intPhaseKey,
intTaskKey,
dteDate,
siCstClsificatnDDL,
UpdateCounter,
CompanyID


from tpa10801

now tpa40801 has two extra columns that tpa10801 doesnt. how would i please the sql gods and get the insert statement running? thanks alot

tiborYou're missing a few of the items that are suggested in the FAQ Entry (http://www.dbforums.com/showthread.php?t=1212452#post4527530) that would probably get you the answer you need on your next try. Specifically, it would help me a lot to know what the table structures are now, so I'd know which columns were missing.

-PatP|||actually i was able to overcome that issue but just deleting the columns from tPA40801. but now i have an issue with the batchkey column. the program that this is all for is recognizing that it is a batchkey and does not allow the program to save while this is trying to insert. so i just need to be able to insert everything there except the batchkey column. hope that helps

insert statement

Hi

I am having a few problems writing an insert statement.

I have a customer table with lookup values inserted in some of the columns which reference another table

customer table

name address1 status

test high street 0

lookup table

code description

0 deleted

1 customer

--

I need to insert data from the customer table into another but not us the lookup table, the statement i have written is:

insert into export (name,address1,status)

select name, address1, ( select descritption from lookup inner join customer on lookup.code = customer.status) from customer

The problem is the subquery is showing all rows from the customer table which is giving me a an error due to inserting multi values which i would expect, the question is how can get round this? row by row inserts if possble but sure how to do this.

Hi

Try

select c.name, c.address1, lu.descritption

from customer c

inner join lookup lu

on lu.code = c.status

|||Thanks for your help worked a treat

Friday, March 9, 2012

insert special characters in database

I am writing a web application and everytime I attempt to insert some special characters in the database I get errors. Is there a way around this?Depends what you mean. If you mean unicode and you are attempting to insert into CHar or VarChar fields then you need to use NVarChar or NChar. BoL has all the gory details. Otherwise you'll need to porovide more details.

HTH|||it seems everytime I include an apostrophe the system gives me an error..not sure why this is happening

my second question is-- when someone types this:

I cant wait
to leave
this place

--It come out like this
I cant wait to leave this place

How can I make the system print all the tab keys and return carriage?

thank you for any responses|||You need to escape apostrophes.

"I can't wait to leave this place"
must be submitted as
"I can''t wait to leave this place"

HTH|||The latter problem is probably a presentation issue - your FE needs to interpret the carriage returns & line feeds.|||hi everybody,

This is Rajen, hope it will be nice sharing ideas with u all. Feeling nice to join u all .:beer:

Sunday, February 19, 2012

Insert or update depending on existence of record

Hello
I'm using SQL Server 2000, Windows 2000.
I'm writing a SP to check for the existence of records in a table, and to
insert or update based on this existence. In other words, I have 2 tables
- source and destination. If a record from the source table already exists
in the destination table I want to update it, if not, I want to insert the
record. At them moment I am using 'If Exists', but I don't know how to
loop through all the records in the source table and check for each one.
Because the SP finds at least one record in both tables, Exists is true and
the SP never reaches the 'Else'.
Here's what I have so far (apologies for the formatting - it's gone a bit
mad):-
CREATE PROCEDURE UpdateClient
AS
Begin
if exists(select a.MembershipNo from tblDataDest2 a, tblDataDest b
where a.MembershipNo = b.MembershipNo)
Begin
Update tblDataDest2
set NINumber = a.NINumber, Firstname = a.Firstname, Surname = a.Surname,
Title = a.Title,
Initials = a.Initials, Address1 = a.Address1, Address2 = a.Address2,
Address3 = a.Address3,
Town = a.Town, County = a.County, Postcode = a.Postcode, Location =
a.Location,
CurrentSalary = a.CurrentSalary, NRA = a.NRA, DOB = a.DOB,
StateRetirementAge = a.StateRetirementAge,
Sex = a.Sex, ServiceStartDate = a.ServiceStartDate, FullTimeIndicator =
a.FullTimeIndicator,
PlanType = a.PlanType, OldPlanBasisAtNRA5 = a.OldPlanBasisAtNRA5,
OldPlanBasisAtNRA4 = a.OldPlanBasisAtNRA4, OldPlanBasisAtNRA3 =
a.OldPlanBasisAtNRA3,
OldPlanBasisAtNRA2 = a.OldPlanBasisAtNRA2, OldPlanBasisAtNRA1 =
a.OldPlanBasisAtNRA1,
OldPlanBasisAtNRA = a.OldPlanBasisAtNRA, OldDBBenefitAtNRA5 =
a.OldDBBenefitAtNRA5,
OldDBBenefitAtNRA4 = a.OldDBBenefitAtNRA4, OldDBBenefitAtNRA3 =
a.OldDBBenefitAtNRA3,
OldDBBenefitAtNRA2 = a.OldDBBenefitAtNRA2, OldDBBenefitAtNRA1 =
a.OldDBBenefitAtNRA1,
OldDBBenefitAtNRA = a.OldDBBenefitAtNRA, CAREAtNRA5 = a.CAREAtNRA5,
CAREAtNRA4 = a.CAREAtNRA4, CAREAtNRA3 = a.CAREAtNRA3, CAREAtNRA2 =
a.CAREAtNRA2,
CAREAtNRA1 = a.CAREAtNRA1, CAREAtNRA = a.CAREAtNRA, DC@.11AtNRA5 =
a.DC@.11AtNRA5,
DC@.11AtNRA4 = a.DC@.11AtNRA4, DC@.11AtNRA3 = a.DC@.11AtNRA3,
DC@.11AtNRA2 = a.DC@.11AtNRA2, DC@.11AtNRA1 = a.DC@.11AtNRA1,
DC@.11AtNRA = a.DC@.11AtNRA, S2P = a.S2P, S2POld = a.S2POld, BatchID =
a.BatchID
From tblDataDest a
where tblDataDest2.MembershipNo = a.MembershipNo
End
Else
Begin
Insert into tblDataDest2 (MembershipNo, NINumber, Firstname, Surname,
Title,
Initials, Address1, Address2, Address3, Town, County, Postcode, Location,
CurrentSalary, NRA,
DOB, StateRetirementAge, Sex, ServiceStartDate, FullTimeIndicator,
PlanType, OldPlanBasisAtNRA5,
OldPlanBasisAtNRA4, OldPlanBasisAtNRA3, OldPlanBasisAtNRA2,
OldPlanBasisAtNRA1,
OldPlanBasisAtNRA, OldDBBenefitAtNRA5, OldDBBenefitAtNRA4,
OldDBBenefitAtNRA3,
OldDBBenefitAtNRA2, OldDBBenefitAtNRA1, OldDBBenefitAtNRA, CAREAtNRA5,
CAREAtNRA4,
CAREAtNRA3, CAREAtNRA2, CAREAtNRA1, CAREAtNRA, DC@.11AtNRA5, DC@.11AtNRA4,
DC@.11AtNRA3, DC@.11AtNRA2, DC@.11AtNRA1, DC@.11AtNRA, S2P, S2POld, BatchID)
Select MembershipNo, NINumber, Firstname, Surname, Title, Initials,
Address1, Address2,
Address3, Town, County, Postcode, Location, CurrentSalary, NRA, DOB,
StateRetirementAge, Sex,
ServiceStartDate, FullTimeIndicator, PlanType, OldPlanBasisAtNRA5,
OldPlanBasisAtNRA4,
OldPlanBasisAtNRA3, OldPlanBasisAtNRA2, OldPlanBasisAtNRA1,
OldPlanBasisAtNRA,
OldDBBenefitAtNRA5, OldDBBenefitAtNRA4, OldDBBenefitAtNRA3,
OldDBBenefitAtNRA2,
OldDBBenefitAtNRA1, OldDBBenefitAtNRA, CAREAtNRA5, CAREAtNRA4,
CAREAtNRA3,
CAREAtNRA2, CAREAtNRA1, CAREAtNRA, DC@.11AtNRA5, DC@.11AtNRA4,
DC@.11AtNRA3,
DC@.11AtNRA2, DC@.11AtNRA1, DC@.11AtNRA, S2P, S2POld, BatchID from
tblDataDest
End
End
GO
Can anyone suggest how I can tweak this in order to have it run through
each record in the source and check it against the destination?
Many thanks
DeniseWhat about updating first all rows and then add the non existing ?
UPDATE tblDataDest2
SET (YourUpdatesetlist)
FROM tblDataDest2 T1
INNER JOIN tblDataDest T2
ON T1.MembershipNo = T2.MembershipNo
and then
INSERt INTO tblDataDest2
(Columnlisthere)
SELECT (Columnlisthere)
FROM tblDataDest T1
WHERE NOT EXISTS
(
SELECT * FROM tblDataDest2 T2
WHERE T1.MembershipNo = T2.MembershipNo
)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Thanks Jens. That worked perfectly. And so simple!
On 3 May 2006 03:15:25 -0700, Jens wrote:

> What about updating first all rows and then add the non existing ?
> UPDATE tblDataDest2
> SET (YourUpdatesetlist)
> FROM tblDataDest2 T1
> INNER JOIN tblDataDest T2
> ON T1.MembershipNo = T2.MembershipNo
> and then
> INSERt INTO tblDataDest2
> (Columnlisthere)
> SELECT (Columnlisthere)
> FROM tblDataDest T1
> WHERE NOT EXISTS
> (
> SELECT * FROM tblDataDest2 T2
> WHERE T1.MembershipNo = T2.MembershipNo
> )
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --|||Jena
I sure would like to see the DDL of the table and some sample data to go
along with that. I have a similar business requirements and would like to se
e
if I could duplicate your results. This would give me a great start.
Thanks In Advance
kw_uh97
"Denise" wrote:

> Thanks Jens. That worked perfectly. And so simple!
>
> On 3 May 2006 03:15:25 -0700, Jens wrote:
>
>|||You can contact me along the EMailadress which can be found on my site:
http://www.sqlserver2005.de